
import Cookies from 'js-cookie'
// console.log('auth:::',Cookies.get('token'))
const AuthMixin = {
    computed: {
      loggedUser () {
        return this.$store.state.userInfo
      },

      isAuthenticated () {
        return !!this.$store.state.userInfo
      },
  
      loggedIn () {
        return !!this.$store.state.userInfo
      },

      // 是企业用户
      isEnterprise () {
        return this.loggedIn && +this.loggedUser.type === 1
      },

      selectedTab () {
        return this.$store.state.selectedTab
      },

      msgLen () {
        return this.$store.state.messageStats.notice || 0
      }
    }
  }

  
  export default AuthMixin
  